In this video we are going to further inspect our temperature times serious and we still have important
pandas and we still have our data frame temperature with the daytime index here on the left hand side.
And the two columns L.A. and New York and we can also call here the info method and we can see that
in the column L.A. We have obviously two missing values.
So we have thirty five thousand sixty four timestamps.
And for L.A. we have only information regarding the temperature for thirty five thousand sixty two timestamps.
So there might be two missing values and we can also further analyze our columns.
This are the described method
so we can see the amount of non missing values.
Then here we have the mean temperature.
So it's no surprise that for L.A. it's it's higher than for New York.
Then we have the minimum temperature.
And for New York it's a minus 22 degrees Celsius.
And also here we have the maximum temperatures.
And so the maximum for L.A. was higher than for New York with forty two point three.
And we can also further analyze a single column.
So for example the L.A. column and we can do this for example with the value columns method and we can
see the most frequent value are the most frequent temperature was the sixteen point two.
And actually one of the most powerful tools to analyze time see areas as graphically with line charts
and therefore we import met plot lap top type plot S P T and by visualizing time series this line charts
we can see how features like temperatures in New York and L.A. it changed over time and we can also
compared to our mania time serious graphically so and in pain as we can do this quite simply with the
plot method.
So if you have a U.S. city plot method on our data frame temperature and the use of the fixed size 15
7
and 2 we can actually see in blue the time series for L.A. and an orange so the time series for New
York and by default when we are calling the plot method on a data frame then pan us creates here a line
plot.
So you have a line plot with on the x axis the index.
And here is a daytime index.
We are here on the x axis.
Actually our date time and on the y axis we have the temperature.
So now here we have said the graph for New York and L.A. in one graph but we can also create subplots
and we can do this here by passing true to the subplots per meter
so here we have now the two subplots organized vertically one above at the other but we can also change
this here and we've actually had the perimeter laid out so let's try this out here and then let's have
a look.
And to the perimeter lay out.
We can pass a top were there on the left hand side.
We can define the amount of rows and on the right hand side the amount of columns slowing.
The default setting is that we have two rows and one column.
But if you want to organize your our two subplots horizontally side by side we can also change this
here.
So we can say that if you want to f one row and two columns
and here we are.
So here we have organized the two subplots the side by side.
And still it's quite hard to compare the two time series because the uh the scale on the BI axis is
different.
So here in New York we're starting with the minus 20 degrees and here for a myth about zero.
And we've already learned that this additional apparent meter called shall buy it.
So let's do this here and here we can define whether the two subplots should share the same y axis.
And in this case you want to compare both Time series.
So actually they should have the same y axis and therefore we can set here the issue by a power meter
to a true
and actually B I feel the same y axis for both subplots and we can see that in summertime there's no
a huge difference between New York and L.A..
So here we are about 30 degrees.
However there's a huge difference here in wintertime.
So in winter time in New York we have to minus 10 minus 20 degrees.
And here now a we hardly get temperatures and zero degrees here and still we can see here that these
are not optimal grass because here we have so many data points that because we have our early data and
it might make more sense to ask your flight sample a weekly or monthly data so far visualizing our time
series it might be better to transform to weekly or monthly.
And in the next videos you will also learn how to aggregate time serious to let's say weekly or monthly
data.
But for the time being we are now finishing with this video and I hope to see you on the next one by.